#将所有0元素移至末尾
ls=[0,1,0,2,0,9,9,0]
for i in  ls:
    if i == 0:
        ls.remove(0)
        ls.append(0)
print(ls)